﻿using System;
namespace Kernelx.Contexts.Defaults.Sequences
{

    /// <summary> 
    /// 
    /// </summary>
    public class Output
    {
        /// <summary>
        /// 
        /// </summary>
        private readonly Func<string> _get;
        /// <summary>
        /// 
        /// </summary> 
        /// <param name="get"></param>
        public Output(Func<string> get) => _get = get;

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public virtual string Get() => _get();
    }

    /// <summary>
    ///  定义{Name:formula}的处理对象
    /// </summary>
    public abstract class BaseBracket
    {
        /// <summary>
        /// 描述公式名称
        /// </summary>
        public abstract string Name { get; }

        /// <summary>
        /// 传入公式信息
        /// </summary>
        /// <param name="formula"></param>
        /// <returns></returns>
        public abstract Output Input(string formula);
    }

}
